package com.kristin.thread;

/**
 * @ClassName DaemonThread
 * @Description TODO
 * @Author Kristin
 * @Date 2021/06/24 11:14:59
 * @Version 1.0.0
 */
public class DaemonThread {





    public static void main(String[] args) throws Exception {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                while(true) {
                    try {
                        Thread.sleep(1);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        });
        thread.setDaemon(true);
        thread.start();
    }

}
